<script setup lang="ts">
import { onMounted, reactive, ref } from "@vue/runtime-core";
import { widths } from "./constant";
</script>

<template>
  <div class="container">
    <div class="header">
      <slot name="header"></slot>
    </div>
    <el-space wrap>
      <el-card v-for="i in  widths " :key="i" class="box-card"
        :style="{ width: `${i.width}px`, height: `${i.height}px` }">
        <template #header>
          <div class="card-header">
            <span>Card name</span>
            <el-button class="button" text>Operation button</el-button>
          </div>
        </template>
        <div v-for=" o  in  4 " :key="o" class="text item">
          {{ 'List item ' + o }}
        </div>
      </el-card>
    </el-space>
  </div>
</template>

<style scoped lang="less">
.container {
  width: 100%;
  height: 100%;
}
</style>